<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 600px;
            margin: 20px auto;
        }

        .left {
            float: left;
            width: 200px;
            border: 1px solid #000;
            height: 600px;
        }

        .right {
            width: 390px;
            height: 600px;
            float: left;
            border: 1px solid #000;
        }

        .top {
            height: 50px;
        }
    </style>
</head>

<body>

    <div class="box">
        <div class="left">
            <ul>
                <!-- 在a标签中只需要利用target属性指向iframe对于的名字即可在iframe中打开新的页面（来源于a标签的href地址）  -->
                <li><a href="./home.html" target="mainbox">首页</a> </li>
                <li><a href="./login.html" target="mainbox">登录</a> </li>
            </ul>
        </div>
        <div class="right">
            <div class="top">
                sfdsfsdf
            </div>
            <div class="content">
                <!-- 定义一个iframe  给一个name属性取名为mainbox-->
                <iframe name="mainbox" src="./home.html" frameborder="0"></iframe>
            </div>
        </div>
    </div>

</body>

</html>